package com.mhf.feign;

import com.mhf.domain.JSONResult;
import com.mhf.domain.Movie;
import com.mhf.domain.MovieUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "server-movie")
@Component
@RequestMapping("/movie")
public interface MovieFeign {
    @GetMapping("/getById/{id}")
    Movie getById(@PathVariable("id")Long id);
    @PostMapping("/buyMovie")
    JSONResult buyMovie(@RequestBody MovieUser movieUser);

    @GetMapping("/getByUserMovie/{id}")
    JSONResult getByUserMovie(@PathVariable("id")Long id);


}
